{% extends "list.html" %}

{% block list_header %}
    {{ layout.query_options(search_label = 'search columns by name') }}
{% endblock %}

{% block table_head %}
    <th>magazine</th>
    <th>column name</th>
    <th></th>
{% endblock %}

{% block table_body %}
    {% for item in context[scaffolding.plural] %}
        <tr>
            <td><a href="{{uri('magazines:view', key=item['publication'].urlsafe())}}">{{s.print_value(item['publication'])}}</td>
            <td><a href="{{uri('columns:view', key=item.key.urlsafe())}}">{{s.print_value(item['name'])}}</a></td>
            <td class="text-right">
                {{ buttons.view_edit_delete_buttons(item, target='column') }}
            </td>
        </tr>
    {% endfor %}
{% endblock %}
